<extend name="Public/base" />
<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2 id="houtai"><span>优惠劵</span></h2>
        <div class="main-title">
            <h2>{$_title}</h2>
        </div>

        <!-- 高级搜索 -->
        <!--<div class="user-center">-->
        <!--<div class="search-form fr cf">-->
        <!--<div class="sleft">-->
        <!--<input type="text" name="condition" class="search-input" value="{:I('condition')}" placeholder="请输入ID或手机号">-->
        <!--</div>-->
        <!--</div>-->
        <!--<div class="search-form fr cf">-->
        <!--<div class="sleft">-->
        <!--<input type="text" name="condition" class="search-input" value="{:I('condition')}" placeholder="请输入用户昵称">-->
        <!--</div>-->
        <!--</div>-->
        <!--&lt;!&ndash;<div class="search-form fr cf">&ndash;&gt;-->
        <!--&lt;!&ndash;<div class="sleft">&ndash;&gt;-->
        <!--&lt;!&ndash;<input type="text" name="condition" class="search-input" value="{:I('condition')}" id="txt">&ndash;&gt;-->
        <!--&lt;!&ndash;</div>&ndash;&gt;-->
        <!--&lt;!&ndash;<a onclick="" style="margin-top: 1px">近7天</a>&ndash;&gt;-->
        <!--&lt;!&ndash;<a onclick="">近30天</a>&ndash;&gt;-->
        <!--&lt;!&ndash;</div>&ndash;&gt;-->
        <!--<div class="sous" style="margin-top: 0">-->
        <!--<a class="sch-btn" href="javascript:;" id="search" url="{:U('AppUser/userList')}"><span>搜索</span><i class="btn-search"></i></a>-->
        <!--</div>-->
        <!--</div>-->
        <!-- 数据列表 -->

        <div class="data-table table-striped">
            <table class="">
                <thead>
                <tr>
                    <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                    <th class="">用户</th>
                    <th class="">优惠劵</th>
                    <th class="">创建时间</th>
                    <th class="">使用时间</th>
                    <th class="">过期时间</th>
                    <th class="">状态</th>
                    <th class="">订单名称</th>
                </tr>
                </thead>
                <tbody>
                <notempty name="_list">
                    <volist name="_list" id="vo">
                        <tr>
                            <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}" /></td>
                            <td>{$vo.user_id}</td>
                            <td>{$vo.coupon_id}</td>
                            <td>{$vo.create_time}</td>
                            <td>{$vo.user_time}</td>
                            <td>{$vo.express_time}</td>
                            <td>{$vo.status}</td>
                            <td>{$vo.invest_id}</td>

                        </tr>
                    </volist>
                    <else/>
                    <td colspan="6" class="text-center"> aOh! 暂时还没有内容! </td>
                </notempty>
                </tbody>
            </table>

        </div>
        <div class="page">
            {$_page}
        </div>

</block>

<block name="script">
    <script type="text/javascript" charset="utf-8">
        //搜索功能
        $("#search").click(function(){
            var url = $(this).attr('url');
            var query  = $('.search-form').find('input').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
            query = query.replace(/^&/g,'');
            if( url.indexOf('?')>0 ){
                url += '&' + query;
            }else{
                url += '?' + query;
            }
            window.location.href = url;
        });
        //回车搜索
        $(".search-input").keyup(function(e){
            if(e.keyCode === 13){
                $("#search").click();
                return false;
            }
        });
        //导航高亮
        highlight_subnav('{:U('AppUser/list')}');
    </script>
    <script type="text/javascript" charset="utf-8">
        onload = function ()
        {
            setInterval (function ()
            {
                var date = new Date ();
                txt.value = date.toLocaleDateString();
            });

        }

    </script>
</block>